From 7a0d4aa9ac753a5e20d6a8d33e947828bac23fce Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Dec 2012 00:30:58 -0500 Subject: [PATCH] * lisp/progmodes/octave-mod.el (octave-mark-block): Move out of tokens and fix open-paren-like token test. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/octave-mod.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 61567b38de5..e98e2a3bb72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-12-05 Stefan Monnier + + * progmodes/octave-mod.el (octave-mark-block): Move out of tokens and + fix open-paren-like token test (bug#12785). + 2012-12-04 Glenn Morris * mail/rmailsum.el (rmail-new-summary): Tweak for diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index ab5a19f8a2f..da40cf51be9 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -794,11 +794,14 @@ does not end in `...' or `\\' or is inside an open parenthesis list." "Put point at the beginning of this Octave block, mark at the end. The block marked is the one that contains point or follows point." (interactive) + (if (and (looking-at "\\sw\\|\\s_") + (looking-back "\\sw\\|\\s_" (1- (point)))) + (skip-syntax-forward "w_")) (unless (or (looking-at "\\s(") (save-excursion (let* ((token (funcall smie-forward-token-function)) (level (assoc token smie-grammar))) - (and level (null (cadr level)))))) + (and level (not (numberp (cadr level))))))) (backward-up-list 1)) (mark-sexp)) -- 2.30.2